[PATCH] script: abort if unused arguments are given
authorChris Hofstaedtler <zeha@debian.org>
Fri, 18 Nov 2022 13:23:37 +0000 (13:23 +0000)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 13 Feb 2023 08:48:21 +0000 (08:48 +0000)
commite2f609ab195ba4e3bacd4328bd1f25c42cec1d06
tree58bf9c524f4fb2a012d30ff0471334fb0ad0432e
parenta0ae22773408d309e17f4703ad7e5c7fcc589e1b
[PATCH] script: abort if unused arguments are given

scripts uses either a free-standing "file" argument, or the value
passed as --log-out "file". Additional filenames are ignored.
They are also ignored if --log-in "file" is given, as it turns off
output logging by default (can still be overriden by adding --log-out).
Avoid surprises when passing multiple filenames by writing usage
message instead.

[kzak@redhat.com: - use errtryhelp() rather than usage()]

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016193
Signed-off-by: Karel Zak <kzak@redhat.com>
Gbp-Pq: Topic upstream
Gbp-Pq: Name PATCH-script-abort-if-unused-arguments-are-given.patch
term-utils/script.c